﻿using System;

public class TimeBar 
{
    void TimeBarDemo()
    {
        DateTime endTime = new DateTime(2021, 1, 15, 0, 0, 0);
        DateTime startTime = DateTime.Now;
        TimeSpan timeSpan = startTime.Subtract(endTime); //当前时间(startTime)减去过期时间(endTime)，
        double totalDays = timeSpan.TotalDays; //总间隔多少天（总数，即全部换算成天）
        if (totalDays < 100)
        {
        
        }
        else
        {
          
        }
    }
}
